import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/autotest/demand/create',
    method: 'post',
    data
  })
}

// 查询产品下的需求
export function searchAll(id, pageNo, pageSize) {
  return request({
    url: '/autotest/demand/searchAll',
    method: 'get',
    params: { id, pageNo, pageSize }
  })
}

// 查询所有的需求
export function findAllDemands(pageNo, pageSize) {
  return request({
    url: '/autotest/demand/findAllDemands',
    method: 'get',
    params: { pageNo, pageSize }
  })
}

export function deleteDemand(id) {
  return request({
    url: '/autotest/demand/deleteDemand',
    method: 'get',
    params: { id }
  })
}
